DEF_PROJECT=../../..
include $(DEF_PROJECT)/scripts/main.mk
name=zlib
version=1.2.7

extdeps=eglibc-tools gcc-tools binutils-tools linux-header-tools

DL_SERV=http
DL_HOST=zlib.net
DL_PATH=
DL_SUFFIX=tar.bz2

cdefs+=CC=$(addsuffix -,$(CC_TARGET))gcc

cflags+=--shared

iflags+=prefix=$(DIR_SYSROOT)/usr

post-build:
	$(MAKE) -C$(if $(build),$(build),$(source)) $(iflags)
	mv $(DIR_SYSROOT)/usr/lib/libz.so.* $(DIR_SYSROOT)/lib
	ln -sf ../../lib/libz.so.1 $(DIR_SYSROOT)/usr/lib/libz.so
	chmod 644 $(DIR_SYSROOT)/usr/lib/libz.a
